// 组件挂载界面
import React from "react";

import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
const  About = React.lazy(()=> import("../pages/about/about"));
const Indexs = React.lazy(()=>import("../pages/index/index"));
const Navigator = React.lazy(()=>import("../components/navigator/navigator"));
const ListDetail = React.lazy(()=>import("./children/details"));
const Events = React.lazy(()=>import("./events/index"));
const Result = React.lazy(()=>import("./events/result/index"));
const Play  = React.lazy(()=>import("./children/play_method/index"));

function Index() {
    return (<>
        <Router>
            <Routes>
                <Route path="" element={<Indexs />}></Route>
                <Route path="play/football" element={<Play/>}></Route>
                <Route path="play/basketball" element={<Play/>}></Route>
                <Route path="events" element={<Events />}></Route>
                <Route path="events/result" element={<Result />}></Route>
                <Route path="detail" element={<ListDetail />}></Route>
                <Route path="about" element={<About />}></Route>
            </Routes>
            <Navigator></Navigator>
        </Router>
    </>)
}


export default Index;